{% extends 'bugs/base.html' %}
{% load staticfiles %}
{% load i18n widget_tweaks %}

{% block title %}New Bug{% endblock %}
{% block extrastyle %}

{% endblock %}
{% block content %}
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{% url 'bugs:index' %}">Software Afair Management System</a>
        </div>
    </div>
</nav>
<div class="container">
    <form action="/new_demand/" method="post" accept-charset="utf-8" class="form"
          role="form" enctype="multipart/form-data">
        {% csrf_token %}
        <legend>New demand</legend>
        {% csrf_token %}
        {% for field in form %}
        {% if field.errors %}
        <div class="form-group has-error">
            <label class="col-sm-2 control-label"
                   for="id_{{ field.name }}">{{ field.label }}</label>
            <div class="col-sm-10">
                {{ field|attr:"class:form-control" }}
                <span class="help-block">
					{% for error in  field.errors %}{{ error }}{% endfor %}
				</span>
            </div>
        </div>
        {% else %}
        <div class="form-group">

            <label class="col-sm-2 control-label"
                   for="id_{{ field.name }}">{{ field.label }}</label>
            <div class="col-sm-10">
                {{ field|attr:"class:form-control" }}
                {% if field.help_text %}
                <p class="help-block">
                    <small>{{ field.help_text }}</small>
                </p>
                {% endif %}
            </div>
        </div>
        {% endif %}
        <br>
        <br>
        {% endfor %}
        <br>
         <div class="form-group">

            <label class="col-sm-2 control-label" for="id_meeting_time">预定开会时间</label>
            <div class="col-sm-10">
                <input class="" id="id_meeting_time" name="meeting_time" type="datetime-local">

            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <br>
                <button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
            </div>
        </div>
    </form>
</div>
<!--<script type="text/javascript">-->
<!--$(document).ready(function () {-->
<!--$("#id_form-0-image").attr('multiple','multiple');-->
<!--})-->
<!--</script>-->
{% endblock %}

